// 请求工具参考https://ext.dcloud.net.cn/plugin?id=392
const { http } = uni.$u
import website from '@/const/website'

// 首页轮播图
export const advertising = (data = {}, header = website.headerForm) => http.get('/app/advertising/list', { params: data, header: header })
export const appSettingList = (data = {}, header = website.headerForm) => http.get('/app/appSetting/list', { params: data, header: header })

/* ***********************************积分券接口******************************************* */
// 券分页
export const pointCouponRedeemPage = (data = {}, header = website.headerForm) => http.get('/app/pointsCoupon/redeemPage', { params: data, header: header })
export const pointCouponReceivePage = (data = {}, header = website.headerForm) => http.get('/app/pointsCoupon/freePage', { params: data, header: header })
export const pointCouponPayPage = (data = {}, header = website.headerForm) => http.get('/app/pointsCoupon/payPage', { params: data, header: header })

export const pointCouponGetInfo = (data = {}, header = website.headerForm) => http.get('/app/pointsCoupon/getInfo', { params: data, header: header })

// 我的券分页
export const pointCouponEnablePage = (data = {}, header = website.headerForm) => http.get('/app/pointsCoupon/enablePage', { params: data, header: header })
// export const pointCouponEnablePage = () => {
//   return new Promise((reslove, reject) => {
//     const ret = '{"code":0,"msg":null,"data":{"records":[{"cardNo":"825067","couponNo":"0115059768","redeemMoney":100,"type":"B","name":"福利券B","status":"Y","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 20:09:56","couponRule":"单柜每满4060元使用一张"},{"cardNo":"825067","couponNo":"0114946710","redeemMoney":100,"type":"B","name":"福利券B","status":"Y","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 20:09:52","couponRule":"单柜每满4060元使用一张"},{"cardNo":"847148","couponNo":"0115145351","redeemMoney":100,"type":"B","name":"福利券B","status":"Y","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 19:49:30","couponRule":"单柜每满4060元使用一张"},{"cardNo":"847148","couponNo":"0113055779","redeemMoney":60,"type":"A","name":"福利券A","status":"Y","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 19:41:07","couponRule":"单柜每满2490元使用一张"},{"cardNo":"847148","couponNo":"0115305339","redeemMoney":100,"type":"B","name":"福利券B","status":"Y","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 19:13:23","couponRule":"单柜每满4060元使用一张"},{"cardNo":"847148","couponNo":"0113771863","redeemMoney":60,"type":"A","name":"福利券A","status":"Y","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 19:13:20","couponRule":"单柜每满2490元使用一张"},{"cardNo":"817785","couponNo":"0115317871","redeemMoney":100,"type":"B","name":"福利券B","status":"Y","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 14:55:26","couponRule":"单柜每满4060元使用一张"},{"cardNo":"856073","couponNo":"0113237911","redeemMoney":60,"type":"A","name":"福利券A","status":"Y","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 12:38:44","couponRule":"单柜每满2490元使用一张"},{"cardNo":"823503","couponNo":"0115342497","redeemMoney":100,"type":"B","name":"福利券B","status":"Y","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-02 16:53:26","couponRule":"单柜每满4060元使用一张"},{"cardNo":"815302","couponNo":"0113896685","redeemMoney":60,"type":"A","name":"福利券A","status":"Y","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-01 10:10:26","couponRule":"单柜每满2490元使用一张"}],"total":285,"size":10,"current":1,"orders":[],"optimizeCountSql":true,"searchCount":true,"countId":null,"maxLimit":null,"pages":29},"success":true}'
//     reslove(JSON.parse(ret))
//   })
// }
// 我的券列表
export const pointCouponEnableList = (data = {}, header = website.headerForm) => http.get('/app/pointsCoupon/enableList', { params: data, header: header })
// 我的券详情
export const pointCouponEnableInfo = (data = {}, header = website.headerForm) => http.get('/app/pointsCoupon/enableInfo', { params: data, header: header })

// 我的已使用券分页
export const pointCouponUsedPage = (data = {}, header = website.headerForm) => http.get('/app/pointsCoupon/usedPage', { params: data, header: header })
// export const pointCouponUsedPage = () => {
//   return new Promise((reslove, reject) => {
//     const ret = '{"code":0,"msg":null,"data":{"records":[{"cardNo":"825067","couponNo":"0115059768","redeemMoney":100,"type":"B","name":"福利券B","status":"Q","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 20:09:56","couponRule":"单柜每满4060元使用一张"},{"cardNo":"825067","couponNo":"0114946710","redeemMoney":100,"type":"B","name":"福利券B","status":"Q","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 20:09:52","couponRule":"单柜每满4060元使用一张"},{"cardNo":"847148","couponNo":"0115145351","redeemMoney":100,"type":"B","name":"福利券B","status":"Q","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 19:49:30","couponRule":"单柜每满4060元使用一张"},{"cardNo":"847148","couponNo":"0113055779","redeemMoney":60,"type":"A","name":"福利券A","status":"Q","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 19:41:07","couponRule":"单柜每满2490元使用一张"},{"cardNo":"847148","couponNo":"0115305339","redeemMoney":100,"type":"B","name":"福利券B","status":"Q","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 19:13:23","couponRule":"单柜每满4060元使用一张"},{"cardNo":"847148","couponNo":"0113771863","redeemMoney":60,"type":"A","name":"福利券A","status":"Q","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 19:13:20","couponRule":"单柜每满2490元使用一张"},{"cardNo":"817785","couponNo":"0115317871","redeemMoney":100,"type":"B","name":"福利券B","status":"Q","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 14:55:26","couponRule":"单柜每满4060元使用一张"},{"cardNo":"856073","couponNo":"0113237911","redeemMoney":60,"type":"A","name":"福利券A","status":"Q","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 12:38:44","couponRule":"单柜每满2490元使用一张"},{"cardNo":"823503","couponNo":"0115342497","redeemMoney":100,"type":"B","name":"福利券B","status":"Q","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-02 16:53:26","couponRule":"单柜每满4060元使用一张"},{"cardNo":"815302","couponNo":"0113896685","redeemMoney":60,"type":"A","name":"福利券A","status":"Q","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-01 10:10:26","couponRule":"单柜每满2490元使用一张"}],"total":285,"size":10,"current":1,"orders":[],"optimizeCountSql":true,"searchCount":true,"countId":null,"maxLimit":null,"pages":29},"success":true}'
//     reslove(JSON.parse(ret))
//   })
// }

// 我的过期券分页
export const pointCouponExpiredPage = (data = {}, header = website.headerForm) => http.get('/app/pointsCoupon/expiredPage', { params: data, header: header })
// export const pointCouponExpiredPage = () => {
//   return new Promise((reslove, reject) => {
//     const ret = '{"code":0,"msg":null,"data":{"records":[{"cardNo":"825067","couponNo":"0115059768","redeemMoney":100,"type":"B","name":"福利券B","status":"Q","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 20:09:56","couponRule":"单柜每满4060元使用一张"},{"cardNo":"825067","couponNo":"0114946710","redeemMoney":100,"type":"B","name":"福利券B","status":"Q","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 20:09:52","couponRule":"单柜每满4060元使用一张"},{"cardNo":"847148","couponNo":"0115145351","redeemMoney":100,"type":"B","name":"福利券B","status":"Q","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 19:49:30","couponRule":"单柜每满4060元使用一张"},{"cardNo":"847148","couponNo":"0113055779","redeemMoney":60,"type":"A","name":"福利券A","status":"Q","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 19:41:07","couponRule":"单柜每满2490元使用一张"},{"cardNo":"847148","couponNo":"0115305339","redeemMoney":100,"type":"B","name":"福利券B","status":"Q","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 19:13:23","couponRule":"单柜每满4060元使用一张"},{"cardNo":"847148","couponNo":"0113771863","redeemMoney":60,"type":"A","name":"福利券A","status":"Q","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 19:13:20","couponRule":"单柜每满2490元使用一张"},{"cardNo":"817785","couponNo":"0115317871","redeemMoney":100,"type":"B","name":"福利券B","status":"Q","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 14:55:26","couponRule":"单柜每满4060元使用一张"},{"cardNo":"856073","couponNo":"0113237911","redeemMoney":60,"type":"A","name":"福利券A","status":"Q","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-03 12:38:44","couponRule":"单柜每满2490元使用一张"},{"cardNo":"823503","couponNo":"0115342497","redeemMoney":100,"type":"B","name":"福利券B","status":"Q","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-02 16:53:26","couponRule":"单柜每满4060元使用一张"},{"cardNo":"815302","couponNo":"0113896685","redeemMoney":60,"type":"A","name":"福利券A","status":"Q","startDate":"2023-04-24","endDate":"2023-05-03","getTime":"2023-05-01 10:10:26","couponRule":"单柜每满2490元使用一张"}],"total":285,"size":10,"current":1,"orders":[],"optimizeCountSql":true,"searchCount":true,"countId":null,"maxLimit":null,"pages":29},"success":true}'
//     reslove(JSON.parse(ret))
//   })
// }

// 可用券-批量核销
export const batchWriteOff = (data = {}) => http.post('/app/pointsCoupon/enable/batchWriteOff', data)
// 券-兑换
export const pointsCouponRedeem = (data = {}) => http.post('/app/pointsCoupon/redeem', data)
// 券-领取
export const pointsCouponGet = (data = {}) => http.post('/app/pointsCoupon/get', data)
// 券-可买取检查
export const pointsCouponCheckPay = (data = {}) => http.post('/app/pointsCoupon/checkPay', data)
// 券-转赠
export const pointsCouponGiven = (data = {}) => http.post('/app/pointsCoupon/given', data)

/* ***********************************星光里券******************************************* */
// 星光里券分页
export const xglPointCouponPage = (data = {}, header = website.headerForm) => http.get('/app/xglPointsCoupon/page', { params: data, header: header })
// export const xglPointCouponPage = () => {
//   return new Promise((reslove, reject) => {
//     const ret = '{"msg":"操作成功","code":0,"data":{"records":[{"scheduleId":"622","type":"B","name":"1200","redeemMoney":1200,"saleMoney":900,"startTime":"2023-03-01","endTime":"2023-03-12","saled":"48","sysl":"0","lqsl":"52","imageBgUrl":"http://60.205.179.131/static/20230302/20230302185033135.jpg","imageBgId":"1632291725490040834","purpose":1},{"scheduleId":"622","type":"A","name":"500","redeemMoney":500,"saleMoney":400,"startTime":"2023-03-01","endTime":"2023-03-12","saled":"92","sysl":"0","lqsl":"17","imageBgUrl":"http://60.205.179.131/static/20230302/20230302185033135.jpg","imageBgId":"1632301971809792001","purpose":1}],"total":2,"size":10,"current":1,"searchCount":true,"pages":1}}'
//     reslove(JSON.parse(ret))
//   })
// }
/* ***********************************星光里停车管理******************************************* */
// 立牌信息详细信息
export const xglParkingPaymentInfo = (data = {}, header = website.headerForm) => http.get('/app/xglParking/paymentInfo', { params: data, header: header })
// 减免金额
export const xglParkingDerate = (data = {}) => http.post('/app/xglParking/derate', data)
// 立牌信息详细信息
export const xglParkingParkSettingList = (data = {}, header = website.headerForm) => http.get('/app/xglParking/parkSettingList', { params: data, header: header })
// 停车兑换
export const xglParkinRedeem = (data = {}) => http.post('/app/xglParking/redeem', data)

/* ***********************************星光里积分券******************************************* */
// 立牌信息详细信息
export const xglPointsCouponPage = (data = {}, header = website.headerForm) => http.get('/app/xglPointsCoupon/page', { params: data, header: header })

/* ***********************************星光里二维码支付牌信息******************************************* */
// 获取立牌信息详细信息
export const xglQRCodePaymentGetInfo = (data = {}, header = website.headerForm) => http.get('/app/xglQRCodePayment/getInfo', { params: data, header: header })
// 立牌商户登陆
export const xglQRCodePaymentMerchantLogin = (data = {}) => http.post('/app/xglQRCodePayment/merchantLogin', data)
// 2.6扫码支付（主扫）下单QrNative
export const xglQRCodePaymentGetPayInfo = (data = {}) => http.post('/app/xglQRCodePayment/getPayInfo', data)

/* ***********************************星光里柜组收银信息******************************************* */
// 星光里柜组收银汇总分页
export const xglSaleBillPage = (data = {}, header = website.headerForm) => http.get('/app/xglSaleBill/page', { params: data, header: header })
// export const xglSaleBillPage = () => {
//   return new Promise((reslove, reject) => {
//     const ret = '{"code":0,"msg":null,"data":{"records":[{"payDate":"2023-06-10 00:00:00","cabinetGroupCode":"2010111046","cabinetName":"付师傅烤鸡腿","payMethodCode":"0710","payMethodName":"立牌扫码支付","payMoney":"987"}],"total":1,"size":10,"current":1,"orders":[],"optimizeCountSql":true,"searchCount":true,"countId":null,"maxLimit":null,"pages":1},"success":true,"fail":false}'
//     reslove(JSON.parse(ret))
//   })
// }

/* ***********************************星光里二维码支付牌-电子券|手工券******************************************* */
// 列表
export const xglQRCodePaymentCouponListToday = (data = {}, header = website.headerForm) => http.get('/app/xglQRCodePaymentCoupon/listToday', { params: data, header: header })
// 查询详情
export const xglQRCodePaymentCouponGetInfo = (data = {}, header = website.headerForm) => http.get('/app/xglQRCodePaymentCoupon/getInfo', { params: data, header: header })

/* ***********************************积分商品******************************************* */
// 分页
export const pointsProductPage = (data = {}, header = website.headerForm) => http.get('/app/pointsProduct/page', { params: data, header: header })
// 兑换
export const pointsProductRedeem = (data = {}) => http.post('/app/pointsProduct/redeem', data)
// 兑换回滚
export const pointsProductRedeemRollBack = (data = {}) => http.post('/app/pointsProduct/redeemRollBack', data)
// 积分商品兑换记录分页
export const pointsProductRedeemLogPage = (data = {}, header = website.headerForm) => http.get('/app/pointsProduct/redeemLogPage', { params: data, header: header })

/* ***********************************积分余额|记录******************************************* */
// 积分收入分页
export const pointsRedeemRecordInPage = (data = {}, header = website.headerForm) => http.get('/app/pointsRedeemRecord/inPage', { params: data, header: header })
// 积分支出分页
export const pointsRedeemRecordOutPage = (data = {}, header = website.headerForm) => http.get('/app/pointsRedeemRecord/outPage', { params: data, header: header })

/* ***********************************用户积分余额信息******************************************* */
// 查询积分余额
export const userPointsBalancePointsBalance = (data = {}, header = website.headerForm) => http.get('/app/userPointsBalance/pointsBalance', { params: data, header: header })
// 查询电子余额
export const userPointsBalanceValueBalance = (data = {}, header = website.headerForm) => http.get('/app/userPointsBalance/valueBalance', { params: data, header: header })

/* ***********************************签到******************************************* */
// 签到
export const sign = (data = {}) => http.post('/app/sign', data)

/* ***********************************门店******************************************* */
// 门店列表
export const storeList = (data = {}, header = website.headerForm) => http.get('/app/store/list', { params: data, header: header })
// 查询门店
export const storeGetInfo = (data = {}, header = website.headerForm) => http.get('/app/store/getInfo', { params: data, header: header })

// 上传图片
export const uploadImg = (data, header = { 'content-type': 'multipart/form-data' }) => http.post('/sys-file/upload', data, { header: header })
export const uploadMioio = data => http.upload('/sys-file/upload-mioio', data)
export const uploadOss = data => http.upload('/sys-file/upload-oss', data)

// 修改个人信息
export const updateProfile = data => http.put('/user/update-profile', data)
export const updatePassword = data => http.put('/user/update-password', data)

/* ***********************************美美停车场接口******************************************* */
// 2.5.1账单查询/费用查询
// export const mmParkingGetParkingPaymentInfo = (data = {}, header = website.headerForm) => http.get('/app/mmParking/getParkingPaymentInfo', { params: data, header: header })
export const mmParkingGetParkingPaymentInfo = () => {
  return new Promise((reslove, reject) => {
    // const ret1 = '{"msg":"操作成功","code":0,"data":{"elapsedTime":393,"elapsedTimeStr":"6小时33分钟","entryTime":"2022-03-24 08:46:58","imgInfo":"https://image-zos.keytop.cn/718000571/192.168.1.88/2023/06/24/20230624205941975_192.168.1.88_007486.jpg","orderNo":"CI8MylS2pESrqWXy13S8vC","parkName":"恩施美美百货","payable":1,"plateNo":"鄂QH2192","totalAmount":10}}'
    const ret = '{"code":0,"msg":null,"data":{"imgInfo":"https://image-zos.keytop.cn/718000571/192.168.1.88/2023/07/03/20230703091116518_192.168.1.88_009866.jpg","parkName":"恩施美美百货停车场","entryTime":"2023-07-03 09:11:16","elapsedTime":496,"elapsedTimeStr":"8小时16分钟","totalAmount":501,"payable":501,"orderNo":"IaavRkvxPF59jteTUWBGO","plateNo":"鄂Q29898"},"success":true,"fail":false}'
    reslove(JSON.parse(ret))
  })
}
// 2.5.2停车费支付
export const mmParkingPayParkingFee = (data = {}) => http.post('/app/mmParking/payParkingFee', data)
// 2.5.8账单查询接口（支持后付费订单）
export const mmParkingGetBackFeeOrderInfo = (data = {}, header = website.headerForm) => http.get('/app/mmParking/getBackFeeOrderInfo', { params: data, header: header })
// 2.3.2查询缴费记录
export const mmParkingGetParkingPaymentList = (data = {}, header = website.headerForm) => http.get('/app/mmParking/getParkingPaymentList', { params: data, header: header })
// 3.2.3缴费记录上报
export const mmParkingPostPayFeeInfo = (data = {}) => http.post('/app/mmParking/postPayFeeInfo', data)
// 为了不想回滚，把券核销、积分抵扣、订单保存、停车费支付 组合成了一个接口
export const mmParkingPayRecordReporting = (data = {}) => http.post('/app/mmParking/payRecordReporting', data)

/* ***********************************美美-积分停车抵扣券******************************************* */
// 查询积分抵扣规则
export const parkingCouponRule = (data = {}, header = website.headerForm) => http.get('/app/mmPointsCouponParking/rule', { params: data, header: header })
// 停车抵扣券-列表
export const mmPointsCouponParkingMyParkingCouponList = (data = {}, header = website.headerForm) => http.get('/app/mmPointsCouponParking/myParkingCouponList', { params: data, header: header })

/* ***********************************订单******************************************* */
// xgl立牌支付分页
export const orderXglPage = (data = {}, header = website.headerForm) => http.get('/app/order/xglPage', { params: data, header: header })
// 新增
export const orderSave = (data = {}) => http.post('/app/order/save', data)

/* ***********************************券订单******************************************* */
// 新增
export const orderCouponSave = (data = {}) => http.post('/app/orderCoupon/save', data)
export const orderCouponCancel = (data = {}) => http.post('/app/orderCoupon/cancel', data)

/* ***********************************停车订单******************************************* */
// 新增
export const orderParkingSave = (data = {}) => http.post('/app/orderParking/save', data)

/* ***********************************停车券接口******************************************* */
// 停车券-核销
export const parkingCouponWriteOff = (data = {}) => http.post('/app/parkingCoupon/writeOff', data)
// 停车券-核销冲正
export const parkingCouponReversal = (data = {}) => http.post('/app/parkingCoupon/reversal', data)
// 停车积分-抵扣费
export const parkingCouponDiscount = (data = {}) => http.post('/app/parkingCoupon/discount', data)
// 停车积分-抵扣费冲正
export const parkingCouponDiscountReversal = (data = {}) => http.post('/app/parkingCoupon/discountReversal', data)

/* ***********************************储值卡查询******************************************* */
// 查询储值卡列表
export const cardList = (data = {}, header = website.headerForm) => http.get('/app/card/list', { params: data, header: header })
// 查询会员储值卡列表
export const cardUserList = (data = {}, header = website.headerForm) => http.get('/app/card/user/list', { params: data, header: header })
// 购买储值卡
export const cardBuy = (data = {}) => http.post('/app/card/buy', data)
// 储值卡充值
export const cardRecharge = (data = {}) => http.post('/app/card/recharge', data)
// 储值卡绑定
export const cardBind = (data = {}) => http.post('/app/card/bind', data)
// 储值卡转赠
export const cardGiven = (data = {}) => http.post('/app/card/given', data)
// 储值卡转赠状态
export const cardGivenStatus = (data = {}) => http.post('/app/card/givenStatus', data)

/* ***********************************微信v2支付******************************************* */
// 微信统一下单
export const wxPay2UnifiedOrder = (data = {}) => http.post('/app/wxPay2/unifiedOrder', data)

/* ***********************************微信v3支付******************************************* */
// 微信统一下单
export const wxPay3UnifiedOrder = (data = {}) => http.post('/app/wxPay3/unifiedOrder', data)

/* ***********************************商品分类管理******************************************* */
// 第一级商品分类
export const productCategoryFirst = (data = {}, header = website.headerForm) => http.get('/app/productCategory/first', { params: data, header: header })
// 第三级商品分类
export const productCategoryThird = (data = {}, header = website.headerForm) => http.get('/app/productCategory/third', { params: data, header: header })
// 商品分类树
export const productCategoryTree = (data = {}, header = website.headerForm) => http.get('/app/productCategory/tree', { params: data, header: header })

/* ***********************************商品管理******************************************* */
// 第三级分类分页查询店铺与商品
export const productSearchPageShop = (data = {}, header = website.headerForm) => http.get('/app/productSearch/pageShop', { params: data, header: header })
// export const productSearchPage = () => {
//   return new Promise((reslove, reject) => {
//     const ret = '{"code":200,"message":"操作成功","data":{"page":1,"size":10,"current": 1,"total":9,"records":[{"id":35,"image":"http://127.0.0.1:8888/crmebimage/public/content/2022/11/17/dfe13616d4904db5ae09ecafab3c05e18pmx6us2l1.png","name":" FOMIX 蛋壳椅 进口头层牛皮橙色单人沙发椅Egg chair设计师蛋椅  Egg chair/意大利头层牛皮/单椅","price":"1110.00","otPrice":"2220.00","sales":0,"ficti":0,"unitName":"件","stock":null,"isSelf":true,"positiveRatio":null,"replyNum":null,"activityStyle":null},{"id":34,"image":"http://127.0.0.1:8888/crmebimage/public/content/2022/11/17/d86f16015f0244848f49782f1ef499dewenwhebqu3.png","name":"荣耀20青春版 AMOLED屏幕指纹 4000mAh大电池 20W快充 4800万 手机 6GB+64GB 冰岛幻境","price":"10000.00","otPrice":"9000.00","sales":0,"ficti":0,"unitName":"件 ","stock":null,"isSelf":true,"positiveRatio":null,"replyNum":null,"activityStyle":null},{"id":31,"image":"http://127.0.0.1:8888/crmebimage/public/store/2022/11/16/82965a964b6147bbb1109948973f16f7vovsuhxld4.jpg","name":"旅游帽子","price":"50.00","otPrice":"0.00","sales":0,"ficti":0,"unitName":"个","stock":null,"isSelf":true,"positiveRatio":null,"replyNum":null,"activityStyle":null},{"id":23,"image":"http://127.0.0.1:8888/crmebimage/public/content/2022/11/17/fb1908fae984482aa7fc36eb7f09ae2bjx0q55lfzz.png","name":"CAMILA&KORALI品牌包包女包斜挎单肩小包女式","price":"1110.00","otPrice":"1110.00","sales":0,"ficti":0,"unitName":"件","stock":null,"isSelf":true,"positiveRatio":null,"replyNum":null,"activityStyle":null},{"id":22,"image":"http://127.0.0.1:8888/crmebimage/public/content/2022/11/15/f2b67dfaa03d4c71b5883e73bb5d6b5b2704m3hp5r.png","name":"鹦鹉YINGWU鹦鹉手风琴120BS4排簧9968黑色红色蓝色41键手风琴专业演奏","price":"6360.00","otPrice":"8000.00","sales":0,"ficti":0,"unitName":"架","stock":null,"isSelf":true,"positiveRatio":null,"replyNum":null,"activityStyle":null},{"id":21,"image":"http://127.0.0.1:8888/crmebimage/public/content/2022/11/15/27252711888943049da71e75f9a1c0b9l4m28x4a26.png","name":"男鞋AF款篮球鞋减震耐磨百搭板鞋男女冰淇淋小白鞋低帮女运动鞋 6222白色 43","price":"999.00","otPrice":"11110.00","sales":0,"ficti":0,"unitName":"双","stock":null,"isSelf":true,"positiveRatio":null,"replyNum":null,"activityStyle":null},{"id":18,"image":"http://127.0.0.1:8888/crmebimage/public/content/2022/11/15/acc22d038bb0435586bebccd5dc53544dpmnjozget.png","name":"FUSSED 21AW designer plaid shirt 异型拼接纯白衬衫女衬衣上衣","price":"0.00","otPrice":"0.00","sales":6,"ficti":0,"unitName":"件","stock":null,"isSelf":true,"positiveRatio":null,"replyNum":null,"activityStyle":null},{"id":15,"image":"http://127.0.0.1:8888/crmebimage/public/content/2022/11/15/fbaeb4d56f614f108caa706190c38d1fb7r5qlcphe.jpg","name":"洗发水","price":"66.00","otPrice":"0.00","sales":0,"ficti":0,"unitName":"瓶","stock":null,"isSelf":true,"positiveRatio":null,"replyNum":null,"activityStyle":null},{"id":14,"image":"http://127.0.0.1:8888/crmebimage/public/content/2022/11/15/d1a1c6908aec42369a27f54e4ee98fddkzg8spjs55.jpg","name":"苹果手机","price":"1999.00","otPrice":"0.00","sales":0,"ficti":0,"unitName":"台","stock":null,"isSelf":true,"positiveRatio":null,"replyNum":null,"activityStyle":null}]}}'
//     reslove(JSON.parse(ret))
//   })
// }
// 第三级分类分页查询商品
export const productSearchPageSpu = (data = {}, header = website.headerForm) => http.get('/app/productSearch/pageSpu', { params: data, header: header })
// 商品详情
export const spuProdInfo = (data = {}, header = website.headerForm) => http.get('/app/spu/prodInfo', { params: data, header: header })
// 热门搜索
export const productSearchKeyword = (data = {}, header = website.headerForm) => http.get('/app/productSearch/keyword', { params: data, header: header })

/* ***********************************购物车表管理******************************************* */
// 新增
export const cartSave = (data = {}) => http.post('/app/shopCartItem/save', data)
// 新增
export const cartCount = (data = {}, header = website.headerForm) => http.get('/app/shopCartItem/count', { params: data, header: header })
// 获取用户购物车信息
export const cartInfo = (data = {}, header = website.headerForm) => http.get('/app/shopCartItem/info', { params: data, header: header })
// 用户地址列表
export const userAddrList = (data = {}, header = website.headerForm) => http.get('/app/userAddr/list', { params: data, header: header })

/* ***********************************品牌信息管理******************************************* */
// 品牌导览
export const brandTreeByName = (data = {}, header = website.headerForm) => http.get('/app/product/brand/treeByName', { params: data, header: header })
// 通过id查询
export const brandgetInfo = (data = {}, header = website.headerForm) => http.get('/app/product/brand/getInfo', { params: data, header: header })
